package com.danger.Activity;

import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;

public class FeedbackActivity extends AppCompatActivity {

    private Toolbar feedback_toolbar;
    private CardView feedback_cardView;
    private EditText feedback_editText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_feedback);
        initView();
        initEvent();
    }

    private void initView() {
        feedback_toolbar = (Toolbar) findViewById(R.id.feedback_toolbar);
        feedback_toolbar.setTitle("反馈");
        feedback_toolbar.setTitleTextColor(Color.WHITE);
        setSupportActionBar(feedback_toolbar);
        feedback_cardView = (CardView) findViewById(R.id.feedback_cardView);
        feedback_editText = (EditText) feedback_cardView.findViewById(R.id.feedback_editText);
    }

    private void initEvent() {
        feedback_toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        feedback_toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
            @Override
            public boolean onMenuItemClick(MenuItem item) {
                switch (item.getItemId()) {
                    case R.id.feedback_send:
                        break;
                    default:
                        break;
                }
                return true;
            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_feedback_menu, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {

        return super.onOptionsItemSelected(item);
    }
}
